<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>通过jquery.qrcode实现二维码</title>
		<script src="../../js/lib/jquery.plugins/jquery.qrcode/jquery-1.8.2.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/lib/jquery.plugins/jquery.qrcode/excanvas.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/lib/jquery.plugins/jquery.qrcode/qrcode.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.qrcode {
				width: 150px;
				height: 150px;
				display: inline-block;
				margin: 0 10px;
			}
		</style>
	</head>

	<body>
		<p>实现方式 canvas + table表格 </p>
		<div class="qrcode" id="qrcode-1"></div>
		<div class="qrcode" id="qrcode-2"></div>
		<div class="qrcode" id="qrcode-3"></div>
		<div class="qrcode" id="qrcode-4"></div>
		<div class="qrcode" id="qrcode-5"></div>
		<div class="qrcode" id="qrcode-6"></div>
		<p>url:<a href="http://www.example.com">http://www.example.com</a></p>
		<a href="../../test/08/index.html">原生的qrcode实现</a>
		<script type="text/javascript">
			$(document).ready(function() {
				for(var i = 1; i < 7; i++) {
					$("#qrcode-" + i).qrcode({
						width: 150,
						height: 150,
						render:i>5?"default":"canvas",
						text: "http://www.example.com",
						src: '../../img/logo/icon ('+(i-1)+").ico"
					})
				}
			});
		</script>
	</body>

</html>